﻿<local:DocumentBase x:Class="WPFExcelReport.YGRVV05"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"                   
                    FontSize="16"
                    Loaded="Window_Loaded" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="105">
    <local:DocumentBase.Resources>
        <ucd:PNumConverter  x:Key="pnum"/>
    </local:DocumentBase.Resources>
    <Grid > 
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0"  >
            <WrapPanel>
                <Label Content="发货日期从" HorizontalAlignment="Left" Margin="5,5,0,0" Name="label1" VerticalAlignment="Top" Width="90" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,5,0,0" Name="FROM_DATE" VerticalAlignment="Top" Panel.ZIndex="1"
                                    SelectedDateChanged ="FROM_DATE_SelectedDateChanged" Width="125" />
                <Label Content="到" Height="28" HorizontalAlignment="Left" Margin="5,5,0,0" Name="label2" VerticalAlignment="Top" Width="33" FontSize="16" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,5,0,0" Name="END_DATE" VerticalAlignment="Top" Panel.ZIndex="2"
                                    SelectedDateChanged ="END_DATE_SelectedDateChanged" Width="122" />
                <Label Content="发货单号" Height="28" HorizontalAlignment="Left" Margin="5,5,0,0" Name="label3" VerticalAlignment="Top" Width="76" FontSize="16" />
                <TextBox Name="txtDNNO" Width="84" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="WhiteSmoke" Panel.ZIndex="3"
                         Text="" KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="8" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="客户编号" Height="28" HorizontalAlignment="Left" Margin="5,5,0,0" Name="label4" VerticalAlignment="Top" Width="76" FontSize="16" />
                <TextBox Name="txtCUSTOMER" Width="162" Margin="5,0,0,0" HorizontalAlignment="Left" Background="WhiteSmoke" Panel.ZIndex="4"
                         Text="" KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="15" FontSize="18" Foreground="#FF141111" Height="33" />
                <Button Content="查询" Height="33" Margin="10,0,0,0"  Name="btnQuery" Width="71" Panel.ZIndex="6"
                        Click="btnQuery_Click"/>
                <Button Content="导出" Height="33" Margin="10,0,0,0"  Name="btnEXCEL" Width="72" Panel.ZIndex="7"
                        Click="btnEXCEL_Click"/>
            </WrapPanel>
        </StackPanel>
        <DataGrid Grid.Row="1" Margin="0,1,0,0"     
                  CanUserReorderColumns="True"  
                CanUserResizeRows="True" CanUserSortColumns="True"                  
                AutoGenerateColumns="False"   
                EnableRowVirtualization="True"  
                HorizontalScrollBarVisibility="Auto"
                VerticalScrollBarVisibility="Auto" 
                RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                ItemsSource="{Binding}" x:Name="MasterDg" >
            <DataGrid.Columns>
                <!--POS NEUDAT	ENDDAT	DNNO	VVSTATUS	SHIPNO	VVEBDAT	DRIVER	CAR	UPS	CARRIER	TEL	CO	
                REQORD	PO	COLOR	PRICE	SURC	SURCHARGE	CUSTOMER	RECADDR	SPPART	FBPART	BEM	ALLQTY	QTY
                TOTNET,KG TOTKG,VALUE-->
                <DataGridTextColumn Header="序号" Binding="{Binding POS}" Width="Auto"/>
                <DataGridTextColumn Header="合同号" Binding="{Binding PO}" Width="Auto"/>
                <DataGridTextColumn Header="纱支" Binding="{Binding FBPART}" Width="Auto"/>
                <DataGridTextColumn Header="色号" Binding="{Binding COLOR}" Width="Auto"/>
                <DataGridTextColumn Header="批号" Binding="{Binding SPPART}" Width="Auto"/>
                <DataGridTextColumn Header="申购单号" Binding="{Binding REQORD}" Width="Auto"/>
                <DataGridTextColumn Header="编织袋+打包带" Binding="{Binding BEM}" Width="Auto"/>
                <DataGridTextColumn Header="件数" Binding="{Binding QTY}" Width="Auto"/>
                <DataGridTextColumn Header="客户" Binding="{Binding CUSTOMER}" Width="Auto"/>
                <DataGridTextColumn Header="发货日期" Binding="{Binding ENDDAT}" Width="Auto"/>
                <DataGridTextColumn Header="单件净重" Binding="{Binding ALLQTY}" Width="Auto"/>
                <DataGridTextColumn Header="总净重" Binding="{Binding TOTNET}" Width="Auto"/>
                <DataGridTextColumn Header="单价" Binding="{Binding PRICE}" Width="Auto"/>
                <DataGridTextColumn Header="附加费" Binding="{Binding SURCHARGE}" Width="Auto"/>
                <DataGridTextColumn Header="金额" Binding="{Binding VALUE}" Width="Auto"/>
                <DataGridTextColumn Header="单件毛重" Binding="{Binding KG}" Width="Auto"/>
                <DataGridTextColumn Header="总毛重" Binding="{Binding TOTKG}" Width="Auto"/>
                <DataGridTextColumn Header="发货单" Binding="{Binding DNNO}" Width="Auto"/>
                <DataGridTextColumn Header="交期" Binding="{Binding DELIVERY}" Width="Auto"/>
                <DataGridTextColumn Header="运输号" Binding="{Binding SHIPNO}" Width="Auto"/>
                <DataGridTextColumn Header="到达日期" Binding="{Binding VVEBDAT}" Width="Auto"/>
                <DataGridTextColumn Header="司机/电话" Binding="{Binding DRIVER}" Width="Auto"/>
                <DataGridTextColumn Header="车牌" Binding="{Binding CAR}" Width="Auto"/>
                <DataGridTextColumn Header="快递单号" Binding="{Binding UPS}" Width="Auto"/>
                <DataGridTextColumn Header="运输公司" Binding="{Binding CARRIER}" Width="Auto"/>
                <DataGridTextColumn Header="电话" Binding="{Binding TEL}" Width="Auto"/>
                <DataGridTextColumn Header="销售单号" Binding="{Binding CO}" Width="Auto"/>
                <DataGridTextColumn Header="收货地址" Binding="{Binding RECADDR}" Width="Auto"/>
            </DataGrid.Columns>
        </DataGrid  >        
    </Grid>
</local:DocumentBase>
